package com.questetra.bpms.air.model
{
    public class FormData
    {
        public function FormData()
        {
        }

        private var _id:Number;
        private var _number:Number;

        private var _name:String;
        private var _dataType:Number;
        private var _subType:Number;
        private var _formType:Number;
        private var _viewOrder:Number;
        private var _accessibility:Number;

        private var _processInstanceId:Number;
        private var _dataInstanceId:Number;

        private var _value:String;

        private var _items:Array /* of SelectItem */;

        public function xmlToObject(xml:XML):void
        {
            this.id = xml.@id;
            this.number = xml.@number;

            this.name = xml["name"];
            this.dataType = xml["data-type"];
            this.subType = xml["sub-type"];
            this.formType = xml["form-type"];
            this.viewOrder = xml["view-order"];
            this.accessibility = xml["accessibility"];

            this.processInstanceId = xml["process-instance-id"];
            this.dataInstanceId = xml["data-instance-id"];

            this.value = xml["value"];
            this.items = SelectItem.xmlToSelectItemList(xml["items"]);
        }

        public function set id(value:Number):void
        {
            this._id = value;
        }
        public function get id():Number
        {
            return this._id;
        }
        public function set number(value:Number):void
        {
            this._number = value;
        }
        public function get number():Number
        {
            return this._number;
        }

        public function set name(value:String):void
        {
            this._name = value;
        }
        public function get name():String
        {
            return this._name;
        }
        public function set dataType(value:Number):void
        {
            this._dataType = value;
        }
        public function get dataType():Number
        {
            return this._dataType;
        }
        public function set subType(value:Number):void
        {
            this._subType = value;
        }
        public function get subType():Number
        {
            return this._subType;
        }
        public function set formType(value:Number):void
        {
            this._formType = value;
        }
        public function get formType():Number
        {
            return this._formType;
        }
        public function set viewOrder(value:Number):void
        {
            this._viewOrder = value;
        }
        public function get viewOrder():Number
        {
            return this._viewOrder;
        }
        public function set accessibility(value:Number):void
        {
            this._accessibility = value;
        }
        public function get accessibility():Number
        {
            return this._accessibility;
        }

        public function set processInstanceId(value:Number):void
        {
            this._processInstanceId = value;
        }
        public function get processInstanceId():Number
        {
            return this._processInstanceId;
        }
        public function set dataInstanceId(value:Number):void
        {
            this._dataInstanceId = value;
        }
        public function get dataInstanceId():Number
        {
            return this._dataInstanceId;
        }

        public function set value(value:String):void
        {
            this._value = value;
        }
        public function get value():String
        {
            return this._value;
        }

        public function set items(value:Array /* of SelectItem */):void
        {
            this._items = value;
        }
        public function get items():Array /* of SelectItem */
        {
            return this._items;
        }
    }
}